<template>
  <view>
      {{name}}----{{age}}
    <button @click="myc">返回</button>
  </view>
</template>

<script setup lang="js">
import  {ref} from 'vue'
import {onReady, onLoad, onShow,onHide,onUnload,} from '@dcloudio/uni-app'
const name=ref()
const age=ref()
onLoad((e)=>{
  console.log('index5  onLoad',e.name,e.age)
  name.value=e.name
  age.value=e.age
})

onShow(() => {
  console.log('index5  onShow')
})
onReady(()=>{
  console.log('index5  onReady')
})
onHide(()=>{
  console.log('index5  onHide')
})
onUnload(()=>{
  console.log('index5  onUnload')
})
const myc = () => {
  uni.navigateBack()
}
</script>
 

<style scoped lang="scss">

</style>
